#include <Telemetry.h>

Telemetry::Telemetry() : QWidget()
{
	gps_label = new QLabel("Coordonnees gps: ");
    pitch_label = new QLabel("Pitch: ");
	roll_label = new QLabel("Roll: ");
	yaw_label = new QLabel("Yaw: ");

	gps_edit = new QLabel("-");
	pitch_edit = new QLabel("-");
	roll_edit = new QLabel("-");
	yaw_edit = new QLabel("-");
	
	QGridLayout *layout = new QGridLayout;
    layout->addWidget(gps_label, 0, 0);
	layout->addWidget(pitch_label, 1, 0);
	layout->addWidget(roll_label, 2, 0);
	layout->addWidget(yaw_label, 3, 0);

	layout->addWidget(gps_edit, 0, 1);
	layout->addWidget(pitch_edit, 1, 1);
	layout->addWidget(roll_edit, 2, 1);
	layout->addWidget(yaw_edit, 3, 1);

	setLayout(layout);
}

void Telemetry::set_gps(QString datas)
{
	gps_edit->setText(datas);
}

void Telemetry::set_pitch(QString datas)
{
	pitch_edit->setText(datas);
}


void Telemetry::set_roll(QString datas)
{
	roll_edit->setText(datas);
}


void Telemetry::set_yaw(QString datas)
{
	yaw_edit->setText(datas);
}






